From 00f4a0b36ee203038e649ab7b3fdb3fe1468b9ce Mon Sep 17 00:00:00 2001 From: Edward E Date: Tue, 22 Aug 2017 16:31:56 -0500 Subject: [PATCH] tools: Use rand when random is unavailable borrowed from c1f075f22c70de54c2b04ca5df008a5e406d3ca9 --- tools/babl-benchmark.c | 5 +++++ tools/babl-gen-test-pixels.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tools/babl-benchmark.c b/tools/babl-benchmark.c index 3ed3539..fa964f9 100644 --- a/tools/babl-benchmark.c +++ b/tools/babl-benchmark.c @@ -20,6 +20,11 @@ #include #include "babl-internal.h" +#ifndef HAVE_SRANDOM +#define srandom srand +#define random rand +#endif + int ITERATIONS = 2; #define N_PIXELS (512*1024) // a too small batch makes the test set live // in l2 cache skewing results diff --git a/tools/babl-gen-test-pixels.c b/tools/babl-gen-test-pixels.c index 59e3176..12b8040 100644 --- a/tools/babl-gen-test-pixels.c +++ b/tools/babl-gen-test-pixels.c @@ -20,6 +20,11 @@ #include #include +#ifndef HAVE_SRANDOM +#define srandom srand +#define random rand +#endif + #define BABL_PATH_NUM_TEST_PIXELS 3072 #define BABL_CONVERSION_NUM_TEST_PIXELS 128 #define BABL_FROMAT_NUM_TEST_PIXELS 256 -- 2.30.2